package tom.client.invoice;

import tom.shared.Invoice;
import tom.shared.Payment;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

public class DialogPayment extends Composite {
	
	private static DialogBox dlg;

	private static DialogPayment dlgPayment;

	private static Invoice inv;
	
	private static String lastCode;

	public static void show(Invoice inv,  Payment output) {
		DialogPayment.inv = inv;
		if (dlg == null) {
			dlgPayment = new DialogPayment();
			dlg = GWT.create(DialogBox.class);
			dlg.setWidget(dlgPayment);
			dlg.setModal(true);
		}
		dlg.center();
		//dlgPayment.textSearch.setFocus(true);
	}

	private static DialogPaymentUiBinder uiBinder = GWT
			.create(DialogPaymentUiBinder.class);

	interface DialogPaymentUiBinder extends UiBinder<Widget, DialogPayment> {
	}

	public DialogPayment() {
		initWidget(uiBinder.createAndBindUi(this));
	}

}
